#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>

int main()
{
	if(access("song",F_OK) != 0 )
	{
		mkfifo("song",0666);
	}

	pid_t pid = fork();
	if(pid < 0)
	{
		printf("fork error!\n");
		return 0;
	}
	else if (pid == 0)
	{
			execl("/usr/bin/mplayer","mplayer","-idle","-slave","-quiet","-input","file=/home/wanglu/Hkword/test/test","/home/wanglu/Music/filre.mp3",NULL);
	}
	else
	{

	}
}

void send_message(char buf)
{
		int fd = open("song",O_WRONLY);

}